# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-django-rest-framework-guardian
_pyname=django-rest-framework-guardian
pkgver=0.3.0
pkgrel=1
arch="noarch"
pkgdesc="django-guardian support for Django REST Framework"
url="https://pypi.python.org/project/djangorestframework-guardian"
license="MIT"
depends="
	py3-django-rest-framework
	py3-django-guardian
	"
makedepends="
	py3-setuptools
	py3-gpep517
	py3-wheel
	"
options="!check" # Broken testsuite
source="$pkgname-$pkgver.tar.gz::https://github.com/rpkilby/django-rest-framework-guardian/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver
subpackages="$pkgname-pyc"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 ./manage.py --no-input -v 2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
ce196162f42671e6eeb56b17dd432380ff99626dd541b8d2e7e80e4ec7bfc5c884fd3c37652632363173368f9eb1ae0aa82dc25cb1c46ba927f2170d1abbce94  py3-django-rest-framework-guardian-0.3.0.tar.gz
"
